package com.whats.indicator.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.ToString;

import java.time.LocalDateTime;

@Data
@ToString
@TableName("t_zbkb_distri_transformer_f")
public class PdTransformer {
    @ExcelIgnore
    @TableId(value = "psr_id")
    private String psrId;
    @ExcelProperty(index = 0, value = "设备名称")
    private String name;
    @ExcelProperty(index = 1, value = "设备类型")
    private String equipType = "配电变压器";
    @ExcelIgnore
    @JsonProperty("city")
    private String belongCityId;

    @ExcelProperty(index = 2, value = "所属地市")
    @JsonProperty("city#Name")
    private String belongCityName;

    @ExcelIgnore
    @JsonProperty("maintOrg")
    private String maintOrgId;

    @ExcelProperty(index = 3, value = "运维单位")
    @JsonProperty("maintOrg#Name")
    private String maintOrgName;
    @ExcelIgnore
    @JsonProperty("maintGroup")
    private String maintGroupId;

    @ExcelProperty(index = 4, value = "运维班组")
    @JsonProperty("maintGroup#Name")
    private String maintGroupName;

    @ExcelProperty(index = 5, value = "设备状态")
    @JsonProperty("deployState#Name")
    private String deployStateName;

    @ExcelProperty(index = 6, value = "设备编码")
    @JsonProperty("equipCode")
    private String equipCode;
    @TableField(exist = false)
    @ExcelProperty(index = 10, value = "PM编码")
    private String pmCode;

    @ExcelProperty(index = 7, value = "实物ID")
    private String utcNum;
    @ExcelIgnore
    private String astOrg;

    @ExcelProperty(index = 8, value = "资产单位")
    @JsonProperty("astOrg#Name")
    private String astOrgName;
    @ExcelProperty(index = 9, value = "资产编号")
    @JsonProperty("astNum")
    private String astNum;
    @ExcelIgnore
    private String astNature;
    @ExcelProperty(index = 11, value = "资产性质")
    @JsonProperty("astNature#Name")
    private String astNatureName;
    @ExcelIgnore
    private String voltageLevel;
    @ExcelProperty(index = 12, value = "电压等级")
    @JsonProperty("voltageLevel#Name")
    private String voltageLevelName;
    @ExcelProperty(index = 13, value = "设备型号")
    private String model;
    @ExcelProperty(index = 14, value = "设备主人")
    @JsonProperty("equipmentOwner#Name")
    private String equipOwnerName;
    @ExcelProperty(index = 15, value = "生产厂家")
    @JsonProperty("manufacturer#Name")
    private String manufacturerName;
    @ExcelProperty(index = 16, value = "出厂日期")
    private String manufactureDate;
    @ExcelProperty(index = 17, value = "投运日期")
    private String operateDate;

    // 是否节能变压器 0:否，1:是
    @ExcelIgnore
    private String energyStatus;
    @ExcelIgnore
    private LocalDateTime etl_tm = LocalDateTime.now();

    public String getPmCode() {
        return equipCode;
    }
}
